﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Orange.Mvc4App.Infrastructure {
    /// <summary>
    /// Set Context before action result excution.
    /// </summary>
    public class OrangeActionFilter : ActionFilterAttribute {
        public override void OnResultExecuting(ResultExecutingContext filterContext) {
            base.OnResultExecuting(filterContext);
            if (filterContext.Result is ViewResult) {
                //filterContext.Controller.ViewBag.pi = new PageInfo();
                var controller = filterContext.RouteData.Values["controller"].ToString();
                var action = filterContext.RouteData.Values["action"].ToString();
            }
        }
    }
}